package gui;

import javax.swing.JPanel;
import java.awt.Dimension;
import java.awt.GridBagLayout;
import java.awt.Insets;

import javax.swing.JLabel;
import java.awt.GridBagConstraints;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;

import main.Controller;

/**
 * 
 * @author Christian
 * 
 */
public class Impressum extends JPanel {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 4510419650937686346L;
	
	/**
	 * 
	 */
	private JLabel jLabel = null;
	
	/**
	 * 
	 */
	private JLabel jLabel1 = null;
	
	/**
	 * 
	 */
	private JLabel jLabel2 = null;
	
	/**
	 * 
	 */
	private JButton jButton = null;
	
	/**
	 * 
	 */
	private JLabel jLabel3 = null;
	
	/**
	 * This method initializes
	 * 
	 */
	public Impressum() {

		super();
		initialize();
	}
	
	/**
	 * This method initializes this
	 * 
	 */
	private void initialize() {

		GridBagConstraints gridBagConstraints11 = new GridBagConstraints();
		gridBagConstraints11.gridx = 0;
		gridBagConstraints11.gridy = 0;
		jLabel3 = new JLabel();
		String betaTag = "";
		if(Controller.isBetaTag()){
			betaTag = "  BETA";
		}
		jLabel3.setText("Version: " + Controller.getVersion() + betaTag);
		GridBagConstraints gridBagConstraints3 = new GridBagConstraints();
		gridBagConstraints3.gridx = 0;
		gridBagConstraints3.gridy = 4;
		gridBagConstraints3.insets = new Insets(15, 5, 5, 5);
		GridBagConstraints gridBagConstraints2 = new GridBagConstraints();
		gridBagConstraints2.gridx = 0;
		gridBagConstraints2.gridy = 3;
		gridBagConstraints2.insets = new Insets(5, 5, 5, 5);
		jLabel2 = new JLabel();
		jLabel2.setText("senden");
		GridBagConstraints gridBagConstraints1 = new GridBagConstraints();
		gridBagConstraints1.gridx = 0;
		gridBagConstraints1.insets = new Insets(5, 5, 5, 5);
		gridBagConstraints1.gridy = 2;
		jLabel1 = new JLabel();
		jLabel1.setText("chumax@gmx.de");
		GridBagConstraints gridBagConstraints = new GridBagConstraints();
		gridBagConstraints.gridx = 0;
		gridBagConstraints.gridy = 1;
		gridBagConstraints.insets = new Insets(5, 5, 5, 5);
		jLabel = new JLabel();
		jLabel.setText("Probleme und Fehler bitte an ");
		this.setLayout(new GridBagLayout());
		this.setSize(new Dimension(402, 231));
		this.add(jLabel, gridBagConstraints);
		this.add(jLabel1, gridBagConstraints1);
		this.add(jLabel2, gridBagConstraints2);
		this.add(getJButton(), gridBagConstraints3);
		this.add(jLabel3, gridBagConstraints11);
	}
	
	/**
	 * This method initializes jButton
	 * 
	 * @return javax.swing.JButton
	 */
	private JButton getJButton() {

		if (jButton == null) {
			jButton = new JButton();
			jButton.setText("zurück");
			jButton.addActionListener(new ActionListener() {
				
				public void actionPerformed(ActionEvent e) {

					Controller.getGuiController().zeigeHauptfenster();
				}
			});
		}
		return jButton;
	}
} // @jve:decl-index=0:visual-constraint="153,15"
